program nangleConvex;

{$APPTYPE CONSOLE}

uses
  SysUtils;
var
  x, y:array of integer;
  i,n,S1,S2:integer;

begin
  readln(n);
  setlength(x, n);
  setlength(y, n);
  S2:=0;
  sum:=0;
  S1:=x[1]*y[2]-x[2]*y[1]+x[2]*y[3]-x[3]*y[2]+x[3]*y[1]-x[1]*y[3];
  for i:=0 to n-3 do
  begin
    S2:=x[i]*y[i+1]-x[i+1]*y[i]+x[i+1]*y[i+2]-x[i+2]*y[i+1]+x[i+2]*y[i]-x[i]*y[i+2];
    if S2*S1<0 then
    begin
      write('No');
      breake;
    end
    else
      S1:=S2;
  end;
  S2:=x[n-2]*y[n-1]-x[n-1]*y[n-2]+x[n-1]*y[1]-x[1]*y[n-1]+x[1]*y[n-2]-x[n-2]*y[1];
  if S2*S1<0 then
  begin
    write('No');
    breake;
  end
  else
   S1:=S2;
  S2:=x[n-1]*y[1]-x[1]*y[n-1]+x[1]*y[2]-x[2]*y[1]+x[2]*y[1]-x[1]*y[2];
  if S2*S1<0 then
    write('No');
  else
    write('Yes');
  readln;
end.
